package cn.buk.tms.dto;

import cn.buk.tms.entity.misc.Supplier;
import com.fasterxml.jackson.annotation.JsonFormat;
import java.util.Date;

/**
 * @author yfdai
 *
 * Supplier的DTO
 */
public class SupplierDto {

    public static SupplierDto createBySupplier(Supplier supplier) {
        SupplierDto dto = new SupplierDto();

        if (supplier != null) {
            dto.setId(supplier.getId());
            dto.setName(supplier.getName());
        }

        return dto;
    }


    private int id;

    private String name;

    private int supplierType;

    private String pinyin;

    private int status;

    /**
     * 支出付款方式id
     */
    private int paymentMethodId;

    /**
     * 支付付款方式的名称
     */
    private String paymentMethodName;


    private String remark;

    private int isDefault;

    private int isBsp;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date createTime;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date lastUpdate;

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getRemark() {
        return remark;
    }

    public void setRemark(String remark) {
        this.remark = remark;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public Date getLastUpdate() {
        return lastUpdate;
    }

    public void setLastUpdate(Date lastUpdate) {
        this.lastUpdate = lastUpdate;
    }

    public int getSupplierType() {
        return supplierType;
    }

    public void setSupplierType(int supplierType) {
        this.supplierType = supplierType;
    }

    public String getPinyin() {
        return pinyin;
    }

    public void setPinyin(String pinyin) {
        this.pinyin = pinyin;
    }

    public int getStatus() {
        return status;
    }

    public void setStatus(int status) {
        this.status = status;
    }

    public int getPaymentMethodId() {
        return paymentMethodId;
    }

    public void setPaymentMethodId(int paymentMethodId) {
        this.paymentMethodId = paymentMethodId;
    }

    public void setPaymentMethodName(String paymentMethodName) {
        this.paymentMethodName = paymentMethodName;
    }

    public String getPaymentMethodName() {
        return paymentMethodName;
    }

    public int getIsDefault() {
        return isDefault;
    }

    public void setIsDefault(int isDefault) {
        this.isDefault = isDefault;
    }

    public int getIsBsp() {
        return isBsp;
    }

    public void setIsBsp(int isBsp) {
        this.isBsp = isBsp;
    }
}
